﻿namespace Chain.Tasks
{
    using System;
    using System.Xml;

    public class TaskConfig
    {
        private static bool _initialized;
        private static XmlNode _scheduleTasks;

        public static void Init(string strPath)
        {
            if (!_initialized)
            {
                XmlDocument document = new XmlDocument();
                document.Load(strPath + "/Task.xml");
                _scheduleTasks = document.SelectSingleNode("TaskConfig/ScheduleTasks");
                _initialized = true;
            }
        }

        public static XmlNode ScheduleTasks
        {
            get
            {
                return _scheduleTasks;
            }
            set
            {
                _scheduleTasks = value;
            }
        }
    }
}

